package io.renren.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 学生表
 * 
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2021-10-06 14:13:49
 */
@Data
@TableName("jx_student")
public class JxStudentEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	public  static  final String DEFIND_PASSWORD = "123456";
	public  static final String DEFIND_ICON="https://dafl.oss-cn-beijing.aliyuncs.com/img/1562557581119.png";
	/**
	 * 学生id
	 */
	@TableId
	private Long id;
	/**
	 * 学生姓名
	 */
	@NotBlank(message="请填写学生姓名", groups = {AddGroup.class, UpdateGroup.class})
	private String name;

	/**
	 * 性别
	 */
	@NotBlank(message="请填写学生性别", groups = {AddGroup.class, UpdateGroup.class})
    private String sex;
	/**
	 * 联系方式
	 */
	@NotBlank(message="请填写学生手机号", groups = {AddGroup.class, UpdateGroup.class})
	private String phoneNum;

	/**
	 * 头像
	 */
	@NotBlank(message="请上传头像", groups = {AddGroup.class, UpdateGroup.class})
	private String icon;

	/**
	 * 学院id
	 */
	private Long schoolId;
	/**
	 * 班级id
	 */

	private Long classId;
	/**
	 * 学号
	 */
	@NotBlank(message="请填写学号", groups = {AddGroup.class, UpdateGroup.class})
	private String studentNum;
	/**
	 * 加密后的密码
	 */
	private String password;

	/**
	 * 密码加盐
	 */
	private  String  salt;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 更新时间
	 */
	private Date updateTime;

	/**
	 * 班级名称
	 */
	@NotBlank(message="请选择您的班级", groups = {AddGroup.class, UpdateGroup.class})
	@TableField(exist=false)
	private  String className;

	/**
	 * 学校名称
	 */
	@TableField(exist=false)
	private  String schoolName;


}
